package com.ticket.sass.admin.dto.input.film;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author ywb
 * @date 2024-04-14 16:27
 */
@Data
@ApiModel
public class SalePriceInput {
    @NotNull
    @ApiModelProperty(value = "ID")
    private Long id;
    
    @DecimalMin(value = "0", inclusive = false, message = "售价必须大于0")
    @DecimalMax(value = "999999.99", inclusive = false, message = "售价不能超过999999.99")
    @Digits(integer = 6, fraction = 2, message = "售价最多包含6位整数和2位小数")
    @ApiModelProperty(value = "售价（不为空则优先级高于所有票价方案）")
    private BigDecimal salePrice;
}
